<template>
    <div>
        <n-button type="primary" size="large" :block="true" :round="true" @click="query">登录</n-button>
    </div>
</template>

<script setup lang='ts'>
import { setLocal } from '@utils/store/local';
import login from '@api/user/login'
// import { useRouter } from 'vue-router';

// const router = useRouter()

const query = async () => {
    const data = await login({
        accountEmail: "admin@qq.com",
        accountPassword: "2ab7106ae583346ff86f9ec6cd03d201",
        code: "23",
        data: "1649681626107",
    })
    console.log(data);

    setLocal('TOKEN', data?.token)
    setLocal('REFRESH_TOKEN', data?.refreshToken)
}

</script>

<style scoped>
</style>